package com.san.school.vo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * ClassName:ResultVO
 * PackageName:com.yy.vo
 * Description:
 *
 * @Author:yy
 * @CreatedAt:2024/10/15 12:22
 */

@Data
@AllArgsConstructor
@NoArgsConstructor
public class ResultVO {
    private Integer code;
    private String msg;
    private Object res;

    public static ResultVO success(String msg,Object res){
        return new ResultVO(200,msg,res);
    }
    public static ResultVO success(String msg){
        return new ResultVO(200,msg,null);
    }

    public static ResultVO failed(String msg){
        return new ResultVO(500,msg,null);
    }
}
